package com.tim.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 作者：Tim
 * 时间：2021/4/28 20:10
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Pet {
    private Integer id;
    private String image;
    private String owner;
    private String petName;
    private String petColor;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date adopTime;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date creatorTime;
    @JsonIgnore
    private String file;

    public Pet(Integer id, String image, String owner, String petName, String petColor, Date adopTime, Date creatorTime) {
        this.id = id;
        this.image = image;
        this.owner = owner;
        this.petName = petName;
        this.petColor = petColor;
        this.adopTime = adopTime;
        this.creatorTime = creatorTime;
    }
}
